#pragma once

#include <string>
#include <iostream>
#include <list>

using namespace std;

typedef string State;

class Observer;

class Subject
{
public:
	virtual ~Subject();
	virtual void Attach(Observer* obs);
	virtual void Detach(Observer* obs);
	virtual void Notify();
	virtual void SetState(const State& stat) = 0;
	virtual State GetState() = 0;
protected:
	Subject();
private:
	list<Observer*>* _obvs;
};

class ImageSubject : public Subject
{
public:
	ImageSubject();
	~ImageSubject();
	void SetState(const State& stat);
	State GetState();
protected:
private:
	State _stat;
};